<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>用户信息表</title>
    <!-- 公共样式 开始 -->
		<link rel="stylesheet" type="text/css" href="Resources/css/base.css">
		<link rel="stylesheet" type="text/css" href="Resources/css/iconfont.css">
		<script type="text/javascript" src="Resources/framework/jquery-1.11.3.min.js"></script>
		<link rel="stylesheet" type="text/css" href="Resources/layui/css/layui.css">
		<script type="text/javascript" src="Resources/layui/layui.js"></script>
		<!-- 滚动条插件 -->
		<link rel="stylesheet" type="text/css" href="Resources/css/jquery.mCustomScrollbar.css">
		<script src="Resources/framework/jquery-ui-1.10.4.min.js"></script>
		<script src="Resources/framework/jquery.mousewheel.min.js"></script>
		<script src="Resources/framework/jquery.mCustomScrollbar.min.js"></script>
		<script src="Resources/framework/cframe.js"></script><!-- 仅供所有子页面使用 -->
		<!-- 公共样式 结束 -->
    </head>
    <body>
    	<div class="cBody">
			<div class="console">
				<form class="layui-form" action="listUser?status=selectlike2" method="post">
					<div class="layui-form-item">
						<div class="layui-input-inline">
							<input type="text" name="key" required lay-verify="required" placeholder="输入用户名" autocomplete="off" class="layui-input">
						</div>
						<button class="layui-btn" lay-submit lay-filter="formDemo">检索</button>
					</div>
				</form>
			</div>
			
			<table class="layui-table">
				<thead>
					<tr>
						<th>用户ID</th>
						<th>用户名</th>
						<th>真实名字</th>
						<th>余额</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${users}" var="user" varStatus="st">
						<tr>
							<td>${user.uid}</td>
							<td>${user.uname}</td>
							<td>${user.relName}</td>
							<td>${user.balance}</td>
							<td align="center">
								<button class="layui-btn layui-btn-xs" onclick="recharge('${user.uid}')">续充</button>
							</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
			
			<script>
				//续充
				function recharge(uid){
					layui.use('layer', function() {
						var layer = layui.layer;
						//iframe层-父子操作
						layer.open({
							title: "续充界面",
							type: 2,
							area: ['70%', '60%'],
							fixed: false, //不固定
							maxmin: true,
							content: 'listUser?status=addmoney&uid='+uid
						});
					});
				}
					
			</script>
		</div>
 	</body>